Process for determining an overflow to the format of the result of an arithmetic operation carried out on two operands

ABSTRACT

A process is for determining an overflow to the format of the result of an arithmetic operation carried out by an arithmetic unit on two operands A and B and an input carry digit Cin. This process is executed in parallel to the processing done by the AU on operands A and B, before the AU has determined the result S of the operation.

FIELD OF THE INVENTION

This invention relates to electronic circuits performing arithmetic operations, and, more particularly, to a process for determining if the format (or size) of the binary result S of an arithmetic operation between two operands A and B, and an input carry digit Cin exceeds the format allowed for this result.

BACKGROUND OF THE INVENTION

Techniques are known in the domain of integrated circuits using calculation units for verifying if the format allowed for the result of an arithmetic operation carried out by an AU (Arithmetic Unit) on two operands A and B and an input carry digit Cin does not exceed a given format. This technique has applications in most calculation units, such as, calculation units included in programmable circuits, such as, a digital signal processor (DSP) or a microcontroller. When it does, an “overflow beyond n bits” occurs and in this case a result saturation may be applied. In general, this type of overflow is determined after the result has been determined, that is, when the AU has finished processing of operands A and B and the input carry digit Cin. In other words, considering FIG. 1 which schematically shows the various processing steps between when operands A and B and the input carry digit Cin are input into the AU, and when the result S is written in the accumulator, the determination of an overflow is classically done after the calculation step E₂.

Therefore, to determine if an overflow has occurred, it is necessary to wait until the AU has finished the calculation. In this case there is a time loss that is particularly long if the calculation done by the AU is complex.

SUMMARY OF THE INVENTION

An object of the invention is to overcome this disadvantage. Accordingly, the present invention is directed to a process capable of determining whether or not there will be an overflow of the result format at the same time as the calculation is being done by the AU, and, if so, to propose a saturation value for this result.

More precisely, the invention relates to a process for determining an overflow for an arithmetic operation carried out by an arithmetic unit (AU) on two operands A and B and an input carry digit Cin input to the AU. This process is characterized in that it is executed in parallel to the process done by the AU on the operands A and B and the input carry digit Cin, and before the AU has determined the result of the arithmetic operation.

Throughout the following description, reference will be made to an arithmetic operation carried out by an arithmetic unit (AU). However, this operation may also be done by an arithmetic and logic unit (ALU).

According to one embodiment of the invention, in which the operands A and B are binary numbers, at least one of the operands A and B has m bits and the format of the required result S has n bits (where n<m), the process includes the steps of: considering only the m−n+1 highest order bits denoted A_(H) for operand A, and B_(H) for operand B and an output carry digit Cout_(n−2) of rank n−2; and checking if A_(H), B_(H) and Cout_(n−2) satisfy a saturation condition, and if so, deducing that the size of the result S exceeds n bits. According to this embodiment, the positive saturation condition in the case of an addition is:

A_(H)+B_(H)+Cout_(n−2)≧1,

and the negative saturation condition in the case of an addition is:

A_(H)+B_(H)+Cout_(n−2)<−1,

where Cout_(n−2) is the output carry digit of rank n−2 in the arithmetic operation of A, B and Cin.

According to another embodiment of the invention in which the operands A and B are binary numbers, at least one of the operands A and B has m bits and the format of the searched result S has n bits where n<m, the process includes the steps of:

determining the propagation terms p_(i) and generation terms g_(i) each defined by a logical relation between components a_(i) and b_(i) of operands A and B;

considering only the m−n+1 highest order bits, denoted P_(H) for propagation terms p_(i) and G_(H) for generation terms g_(i), and the output carry digit of rank n−2; and

checking if P_(H), G_(H) and Cout_(n−2) satisfy a saturation condition, and if so deducing that the size of the result S exceeds n bits.

If A is expressed on 40 bits and B on 32 bits with n=32 and m=40, the positive saturation conditions are:

g₃₁=1 and (∀iε [39:32], p_(i)=1) and Cout₃₀=1;

or p₃₉=1 and g₃₉=0 and (∃iε [38:32], g_(i)=1);

or g₃₉=0 and (∀iε [39:31], p_(i)=0) and Cout₃₀=1;

or p₃₉=0 and (∃iε [38:31], p_(i)=1) and g₃₉=0;

and the negative saturation conditions are:

g₃₉=1 and (∃iε [38:31], g_(i)=0);

or (∀iε [39:31], g_(i)=1) and Cout₃₀=0;

or p₃₉=1 and (∃iε [38:32], p_(i)=0) and ∀iε [38:32], g_(i)=0

or (∀iε [39:32], p_(i)=1) and p₃₁=0 and g₃₁=0 and

Cout₃₀=0

In the following description of the process according to the invention, it will be considered that A and B are two binary numbers, that at least one of A and B has m bits, and that the result S is a binary number with m bits corrected to format with n bits (where A, B and S are coded in two's complement), where n and m depend on the use of the calculation unit. The process according to the invention checks whether the format of the result S that the AU has to calculate will have n bits or less than n bits.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows the main steps in the process according to the invention;

FIG. 2 shows a table representing the various saturation conditions for a DSP 950 if operands A and B are written with terms A_(H), A_(L), B_(H), B_(L); and

FIG. 3 shows a table containing saturation conditions for an ST10 microcontroller if operands A and B are written with terms A_(H), A_(L), B_(H), B_(L).

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 schematically shows the various steps in the process according to the invention. This FIG. 1 shows the AU 1 into which operands A and B and the input carry digit Cin are input, and which carries out processing (step E₁, step E₂) on operands A and B and Cin to produce an output result S. This result S is sent to a multiplexer 2 during a step E₃.

At the same time as the processing done by the AU during steps E₁ to E₃, the process according to the invention determines whether or not the format of the result S will exceed the format allowed for it. This determination is done during a step E₄ by an evaluation unit 4 which receives the data supplied by the AU as input. These data may be of two different types, which will be described later.

If the format of the result S exceeds the specified format, the evaluation unit 4 generates a SAT⁻ negative saturation flag or a SAT⁺ positive saturation flag. This information may be used either as flags or to control multiplexer 2 which receives the value of the result S, the negative saturation value −2^(n−1) and the positive saturation value 2^(n−1)−1, as an input. If this is not the case, the evaluation unit 4 sends a NON-SAT message to multiplexer 2, meaning that saturation did not occur (in other words there was no overflow of the format) and that the result S may be loaded as soon as it has been determined. The result S or the saturation value chosen by the evaluation unit 4 may then be written in an accumulator 3, in a step E₆.

In the following description of the process according to the invention, it will be considered that A and B are two binary numbers with m bits, and that the result S is a binary number with m bits corrected to format with n bits (where A, B and S are coded in two's complement), where n and m depend on the use of the calculation unit. The process according to the invention checks whether the format of the result S that the AU has to calculate will have n bits or less than n bits.

In general, determining an overflow (also called “saturation”) of the format of result S includes checking if one of the positive or negative saturation conditions expressed as a function of A_(H), B_(H) and Cout_(n−2) (Cout_(n−2) is the output carry digit of rank n−2) is satisfied, where:

A_(H) and B_(H) are such that A=A_(H)·2^(n−1)+A_(L) and B=B_(H)·2^(n−1)+B_(L)

More precisely: $A = {{\sum\limits_{i = 0}^{m - 1}\quad {a_{i}2^{i}}} = {{{\sum\limits_{i = {n - 1}}^{m - 1}\quad {a_{i}2^{i}}} + {\sum\limits_{i = 0}^{n - 2}\quad {a_{i}2^{i}}}} = {{A_{H}2^{n - 1}} + A_{L}}}}$ where $A_{H} = {{\sum\limits_{i = {n - 1}}^{m - 1}\quad {a_{i}2^{i - n + 1}\quad {and}\quad A_{L}}} = {\sum\limits_{i = 0}^{n - 2}\quad {a_{i}2^{i}}}}$

Therefore, the term A_(H) corresponds to the m−n+1 highest order bits which include a sign bit and the m−n highest order bits. Similarly: $B = {{\sum\limits_{i = 0}^{m - 1}\quad {b_{i}2^{i}}} = {{{\sum\limits_{i = {n - 1}}^{m - 1}\quad {b_{i}2i}} + {\sum\limits_{i = 0}^{n - 2}\quad {b_{i}2^{i}}}} = {{B_{H}2n} - 1 + B_{L}}}}$ where $B_{H} = {{\sum\limits_{i = {n - 1}}^{m - 1}\quad {b_{i}2^{i - n + 1}\quad {and}\quad B_{L}}} = {\sum\limits_{i = 0}^{n - 2}\quad {b_{i}2^{i}}}}$

Therefore, the term B_(H) corresponds to the m−n+1 highest order bits that include a sign bit and the m−n highest order value bits.

For example, for the case of an addition, it is necessary to positively saturate the result S as soon as its format exceeds n bits, namely S≧2^(n−1), which is equivalent to writing A+B+Cin≧2^(n−1).

Furthermore: $S = {{\sum\limits_{i = 0}^{m - 1}\quad {S_{i}2^{i}}} = {{{\sum\limits_{i = {n - 1}}^{m - 1}\quad {S_{i}2^{i}}} + {\sum\limits_{i = 0}^{n - 2}\quad {S_{i}2^{i}}}} = {{S_{H}2^{n - 1}} + S_{L}}}}$ where $S_{H} = {{\sum\limits_{i = {n - 1}}^{m - 1}\quad {s_{i}2^{i - n + 1}\quad {and}\quad S_{L}}} = {\sum\limits_{i = 0}^{n - 2}\quad {s_{i}2^{i}}}}$

Moreover, S≧2^(n−1) means S_(H)≧1, hence a positive saturation condition:

A_(H)+B_(H)+Cout_(n−2)≧1,

where Cout_(n−2) is the output carry digit of rank n−2.

A negative saturation of the result S results in S<−2^(n−1), which is equivalent to writing A+B+Cin<−2^(n−1). Furthermore, S<−2^(n−1) means S_(H)<1; therefore the negative saturation condition can be written:

A_(H)+B_(H)+Cout_(n−2)<−1

where Cout_(n−2) is the output carry digit of rank n−2.

We will now describe two example applications of the process according to the invention. For these examples, the process is applied firstly to a DSP 950 signal processor, and secondly to an ST 10 microcontroller. In these two examples, m is equal to 40 and n is equal to 32. In other words, the arithmetic operation for these two examples is carried out on 40 bits and the saturation format is 32 bits. Furthermore, restrictive assumptions concerning operand B are used in the DSP 950 and the ST 10. In particular for the DSP 950, it is considered that A is expressed on 40 bits and B can be expressed on 32 bits and then extended to 40 bits; therefore the 9 highest order bits are identical; and we then have:

B_(H)=111111111 or B_(H)=000000000, in other words:

B_(H)−1 or B_(h)=0.

In this case, four positive saturation conditions of S can be determined which are summarized in the right part of the table in FIG. 2.

More precisely, these four conditions are:

B_(H)=0 and A_(H)>0;

or B_(H)−1 and A_(H)>1;

or B_(H)=0 and A_(H)=0 and Cout₃₀=1;

or B_(H)−1 and A_(H)=1 and Cout₃₀=1.

Considering the previous assumption about B_(H), in other words B_(H)−1 or B_(H)=0, four negative saturation conditions of S are also determined. These four conditions are summarized in the left part of the table in FIG. 2.

More precisely, these conditions are:

B_(H)=0 and A_(H)<−2;

or B_(H)=−1 and A_(H)<−1;

or B_(H)=0 and A_(H)=−2 and Cout₃₀=0;

or B_(H)=−1 and A_(H)=−1 and Cout₃₀=0.

In the case of the ST 10 microcontroller, the assumption is made that A is expressed on 40 bits and B is expressed on 33 bits and then extended to 40 bits; therefore the 8 highest order bits are identical; we then have:

B_(H)=111111110 or B_(H)=111111111,

or B_(H)=000000000 or B_(H)=000000001, in other words:

B_(H)−2 or B_(H)−1 or B_(H)=0 or B_(H)=1.

In this case, 8 positive saturation conditions of S can be determined, which are summarized in the right part of the table in FIG. 3.

More precisely, these conditions are:

B_(H)=−2 and A_(H)>2;

or B_(H)=−1 and A_(H)>1;

or B_(H)=0 and A_(H)>0;

or B_(H)=1 and A_(H)>−1;

or B_(H)=−2 and A_(H)=2 and Cout₃₀=1;

or B_(H)=−1 and A_(H)=1 and Cout₃₀=1;

or B_(H)=0 and A_(H)=0 and Cout₃₀=1;

or B_(H)=1 and A_(H)=−1 and Cout₃₀=1.

Considering the previous assumption about B_(H), it is also possible to determine 8 negative saturation conditions that are summarized in the left part of the table in FIG. 3.

More precisely, these conditions are:

B_(H)=−2 and A_(H)<0;

or B_(H)=−1 and A_(H)<−1;

or B_(H)=0 and A_(H)<−2;

or B_(H)=1 and A_(H)<−3;

or B_(H)=−2 and A_(H)=0 and Cout₃₀=0;

or B_(H)=−1 and A_(H)=−1 and Cout₃₀=0;

or B_(H)=0 and A_(H)=−2 and Cout₃₀=0;

or B_(H)=1 and A_(H)=−3 and Cout₃₀=0.

Therefore as we have just seen, the first embodiment of the invention includes determining a possible overflow by checking if the values A_(H), B_(H) and Cout_(n−2) satisfy the saturation conditions given above. A second embodiment of the invention includes using the propagation term P and the generation term G determined by the AU to determine if there will be an overflow of the format.

To accelerate processing by the AU, there are known methods of determining propagation terms p_(i) and generation term g_(i), both of which are functions of a_(i) and b_(i). In other words, the AU determines terms p_(i) and g_(i) such that:

p_(i)=f₁ (a_(i), b_(i), NP, NG);

and g_(i)=f₂ (a_(i), b_(i), NP, NG),

where NP and NG are two vectors that are used to choose the arithmetic operation to be done (addition, subtraction, etc.).

p_(i) and g_(i) are defined differently as a function of a_(i) and b_(i) depending on the operation to be done.

In particular in the case of an addition, the propagation and generation terms are as follows:

p_(i)=a_(i) ⊕ b_(i);

and g_(i)=a_(i)·b_(i),

where the symbol “⊕” means exclusive OR and “.” means AND.

In the case of a subtraction, p_(i) and g_(i) may be determined as follows:

p_(i)={overscore (a_(i)+L ⊕b_(i)+L )}; and g_(i)=a_(i)·{overscore (b_(i)+L )}.

Therefore, the result S of the operation is expressed as a function of the terms p_(i) and g_(i):

S=f₃(A, B, C_(in));

therefore S=f₄(P, G, C_(in)).

The bits of S with order m−1 to n−1 are the only bits that are useful for detecting an overflow; they may be expressed as a function of the output carry digit of rank n−2, Cout_(n−2), and the highest order terms p_(i) and g_(i):

S_(m−1,n−1)=f₅(p_(j), g_(j), Cout_(n−2)) where n−1≦j≦m−1.

Thus, the P and G terms are defined differently with respect to operands A and B, depending on the arithmetic operation chosen. On the other hand, the relation given above for S_(m−1,n−1) is always the same, such that saturation detection is the same for an addition, a subtraction and all operations for which P and G may be defined as a function of the operands A and B.

Therefore, the process according to the invention includes using these terms P and G to determine a possible overflow of the result S. When the AU has determined these terms P and G (step E₁), it transmits them to the evaluation unit 4 which determines whether or not there will be an overflow, by checking whether or not one of the saturation conditions is verified.

These saturation conditions based on the terms P_(H) and G_(H) are determined from the previously given conditions on A_(H) and B_(H), and considering that: $P = {{\sum\limits_{i = 0}^{m - 1}\quad {p_{i}2^{i}}} = {{{\sum\limits_{i = {n - 1}}^{m - 1}\quad {p_{i}2^{i}}} + {\sum\limits_{i = 0}^{n - 2}\quad {p_{i}2^{i}}}} = {{P_{H}2n} - 1 + P_{L}}}}$ where $P_{H} = {{\sum\limits_{i = {n - 1}}^{m - 1}\quad {p_{i}2^{i - n + 1}\quad {and}\quad P_{L}}} = {\sum\limits_{i = 0}^{n - 2}\quad {p_{i}2^{i}}}}$ $G = {{\sum\limits_{i = 0}^{m - 1}\quad {g_{i}2^{i}}} = {{{\sum\limits_{i = {n - 1}}^{m - 1}\quad {g_{i}2^{i}}} + {\sum\limits_{i = 0}^{n - 2}\quad {g_{i}2^{i}}}} = {{G_{H}2^{n - 1}} + G_{L}}}}$ where $G_{H} = {{\sum\limits_{i = {n - 1}}^{m - 1}\quad {g_{i}2^{i - n + 1}\quad {and}\quad G_{L}}} = {\sum\limits_{i = 0}^{n - 2}\quad {g_{i}2^{i}}}}$

Using the assumptions given above for A_(H) and B_(H) for a DSP 950 signal processor, the following saturation conditions are determined:

Positive saturation conditions:

B_(H)=0 and A_(H)>O,

if B_(H)=0 then $\left\{ \begin{matrix} {{P_{H} = A_{H}}\quad} \\ {{{{and}\quad G_{H}} = 000000000}\quad} \end{matrix}\quad \right.$

if A_(H)>0 then $\left\{ \begin{matrix} {{a_{39} = 0}\quad} \\ {{{and}\quad {\exists{i\quad {\varepsilon \left\lbrack {38\text{:}31} \right\rbrack}}}},{a_{i} = 1}} \end{matrix} \right.$

then: p₃₉=0 and (∃iε [38:31], p_(i)=1) and g₃₉=0;

B_(H)=−1 and A_(H)>1,

if B_(H)=0 then $\left\{ \begin{matrix} {{P_{H} = \overset{\_}{A_{H}}}\quad} \\ {{{and}\quad G_{H}} = A_{H}} \end{matrix} \right.$

if A_(H)>1 then $\left\{ \begin{matrix} {{a_{39} = 0}\quad} \\ {{{and}\quad {\exists{i\quad {\varepsilon \left\lbrack {38\text{:}32} \right\rbrack}}}},{a_{i} = 1}} \end{matrix} \right.$

then p₃₉=1 and (∃iε [38:32], g_(i)=1) and g₃₉

if B_(H)=0 and A_(H)=0 and Cout₃₀=1,

then $\left\{ \begin{matrix} {{P_{H} = 0}\quad} \\ {{{and}\quad G_{H}} = 0} \end{matrix} \right.$

then: ∀iε [39:31], p_(i)=0 and g₃₉=0 and Cout₃₀=1;

B_(H)=−1 and A_(H)=+1 and Cout₃₀=1,

if B_(H)=−1 then

since A_(H)=1,

then (∀iε [39:32], p_(i)=1) and g₃₁=1 and Cout₃₀=1.

Negative saturation conditions:

B_(H)=0 and A_(H)<−2,

if B_(H)=0 then $\left\{ \begin{matrix} {{P_{H} = A_{H}}\quad} \\ {{{{and}\quad G_{H}} = 000000000}\quad} \end{matrix}\quad \right.$

if A_(H)<−2 then $\left\{ {\begin{matrix} {a_{39} = 1} \\ {{{and}\quad {\exists{i \in \text{[38:32]}}}},{a_{i} = 0}} \end{matrix}} \right.$

then p₃₉=1 and ∃iε [38:32], p_(i)=0

and ∀iε [38:32], g_(i)=0;

B_(H)=−1 and if A_(H)<−1,

if B_(H)=−1 then

if A_(H)<−1 then $\left\{ {\begin{matrix} {a_{39} = 1} \\ {{{and}\quad {\exists{i \in \text{[38:31]}}}},{a_{i} = 0}} \end{matrix}} \right.$

then g₃₉=1 and ∃iε [38:31], g_(i)=0;

B_(H)=0 and A_(H)=−2 and Cout₃₀=0,

if B_(H)=0 then $\left\{ {\begin{matrix} {P_{H} = A_{H}} \\ {{{and}\quad G_{H}} = 0} \end{matrix}} \right.$

if A_(H)=−2 then $\left\{ {\begin{matrix} {a_{31} = 0} \\ {{{and}\quad {\forall{i \in \text{[39:32]}}}},{a_{i} = 1}} \end{matrix}} \right.$

then (∀iε [39:32], p_(i)=1) and p₃₁=0 and g₃₁=0

and Cout₃₀=0;

B_(H)=−1 and A_(H)=−1 and Cout₃₀=0,

if B_(H)=−1 then

if A_(H)=−1 then ∀iε [39:31], a₁=1

then (∀iε [39:31], g_(i)=1) and Cout₃₀=0.

The assumptions given above are used in the case of the ST 10 microcontroller. The following positive saturation conditions are then deduced:

if B_(H)=−2 and A_(H)>2

or if B_(H)=−1 and A_(H)>1

then p₃₉ ₁ and g₃₂=1 and (p₃₁)XOR (g₃₁)=1

or p₃₉=1 and ∃iε [38:33], g_(i)=1;

if B_(H)=0 and A_(H)>0

or if B_(H)1 and A_(H)>−1,

which corresponds to $\left\{ {\begin{matrix} {B_{H} \geq {0\quad {and}\quad A} > {- 1}} \\ {{and}\quad {not}\quad \left( {B_{H} = {{0\quad {and}\quad A_{H}} = 0}} \right)} \end{matrix}} \right.$

then p₃₉=0 and g₃₉=0

and NOT (∀iε [38:31], p_(i)=0 and g₃₁=0)

if B_(H)=−2 and A_(H)=2 and Cout₃₀₌1,

which corresponds to $\left\{ {\begin{matrix} \left( {{\forall{i \in \text{[39:32]}}},{p_{i} = {{\overset{\_}{a_{i}}\quad {and}\quad g_{i}} = a_{i}}}} \right) \\ {{{and}\quad p_{31}} = a_{31}} \\ {{{and}\quad g_{31}} = 0} \\ {{{and}\quad {Cout}_{30}} = 1} \end{matrix}} \right.$

then: (∀iε [39:32], p_(i)=1) and p₃₁=0 and g₃₂=1

and g₃₁=0 and Cout₃₀=1;

B_(H)=−1 and A_(H)=1 and Cout₃₀=1,

if B_(H)=−1 then $\left\{ {\begin{matrix} {P_{H} = \overset{\_}{A_{H}}} \\ {{{and}\quad G_{H}} = A_{H}} \end{matrix}} \right.$

the condition becomes $\left\{ {\begin{matrix} {p_{39} = 1} \\ {{{and}\quad {\forall{i \in \text{[38:32]}}}},{p_{i} = 1}} \\ {{{and}\quad g_{31}} = 1} \\ {{{and}\quad {Cout}_{30}} = 0} \end{matrix}} \right.$

then: (∀iε [39:32], p_(i)=1) and g₃₁=1 and Cout₃₀=1;

B_(H)=0 and A_(H)=0 and Cout₃₀=1,

when A_(H)=0 and ${B_{H} = 0},\left\{ \begin{matrix} {P_{H} = 0} \\ {{{and}\quad G_{H}} = 0} \end{matrix} \right.$

then: (∀iε [39:31], p_(i)=0) and g₃₉=0 and g₃₁=0 and Cout₃₀=1;

B_(H)=1 and A_(H)=−1 and Cout₃₀=1,

when A_(H)=−1 then $\left\{ {\begin{matrix} {P_{H} = {\overset{\_}{B}}_{H}} \\ {{{and}\quad G_{H}} = B_{H}} \end{matrix}} \right.$

when A_(H)=−1 and ${B_{H} = 1},\left\{ \begin{matrix} {P_{39} = 1} \\ {{{and}\quad {\forall{i \in \text{[38:32]}}}},{p_{i} = 1}} \\ {{{and}\quad g_{31}} = 1} \end{matrix} \right.$

then (∀iε [39:32], p_(i)=1) and g₃₁=1 and Cout₃₀=1,

and the negative saturation conditions:

if B_(H)=−2 and A_(H)<0

or if B_(H)=−1 and A_(H)<−1,

which corresponds to $\left\{ {\begin{matrix} \begin{matrix} {B_{H} < 0} \\ {{{and}\quad A_{H}} < 0} \end{matrix} \\ {{and}\quad {not}\quad \left( {B_{H} = {{{- 1}\quad {and}\quad A_{H}} = {- 1}}} \right)} \end{matrix}} \right.$

then g₃₉=1 and ∃iε [38:31], g_(i)=0;

B_(H)=0 and A_(H)<−2,

when B_(H)=0 then $\left\{ {\begin{matrix} {P_{H} = A_{H}} \\ {{{and}\quad G_{H}} = 000000000} \end{matrix}} \right.$

then $\left\{ {\begin{matrix} {a_{39} = 1} \\ {{{{and}\quad {\exists i}} = \text{[38:32]}},{a_{i} = 0}} \end{matrix}} \right.$

then: p₃₉=1 and ∃iε [38:32], p_(i)=0

and ∀iε [38:32], g_(i)=0;

B_(H)=1 and A_(H)<−3,

when ${B_{H} = 1},\left\{ {\begin{matrix} \left( {{\forall{i \in \text{[39:32]}}},{p_{i} = {{a_{i}\quad {and}\quad g_{1}} = 0}}} \right) \\ {{{and}\quad p_{31}} = {{\overset{\_}{a_{31}\quad}\quad {and}\quad g_{31}} = a_{31}}} \end{matrix}} \right.$

when ${A_{H} < {- 3}},\left\{ \begin{matrix} {A_{H} < 0} \\ {{{and}\quad A_{H}} \neq {- 1}} \\ {{{and}\quad A_{H}} \neq {- 2}} \\ {{{and}\quad A_{H}} \neq {- 3}} \end{matrix} \right.$

then: p₃₉=1 and ∃iε [38:32], g_(i)=0

and not (∀iε [38:32], p_(i)=1)

and not (∀iε [38:33],p_(i)=1 and p₃₂=0 and g₃₁=1);

B_(H)=−2 and A_(H)=0 and Cout₃₀=0,

when ${B_{H} = {- 2}},\left\{ \begin{matrix} \left( {{\forall{i \in \text{[39:32]}}},{p_{i} = {{\overset{\_}{a_{i}}\quad {and}\quad g_{i}} = a_{i}}}} \right) \\ {{{{and}\quad p_{31}} = a_{31}}\quad} \\ {{{and}\quad g_{31}} = 0} \end{matrix} \right.$

when A_(H)=0, ∀iε [39:31], a_(i)=0

then (∀iε [39:32], p_(i)=1) and p₃₁=0 and g₃₁=0 and Cout₃₀=0;

B_(H)=−1 and A_(H)=−1 and Cout₃₀=0,

when ${B_{H} = {- 1}},\left\{ \begin{matrix} {P_{H} = {\overset{\_}{A}}_{H}} \\ {{{and}\quad G_{H}} = A_{H}} \end{matrix} \right.$

when A_(H)=−1, ∀iε [39:31], a_(i)=1

when A_(H)=−1, ∀iε [39:31], a_(i)=1

then (∀iε [39:31], g_(i)=1) and Cout₃₀=0;

if B_(H)=0 and A_(H)=−2 and Cout₃₀=0,

when ${B_{H} = 0},\left\{ \begin{matrix} {P_{H} = {\overset{\_}{A}}_{H}} \\ {{{and}\quad G_{H}} = 0} \end{matrix} \right.$

when ${A_{H} = {- 2}},\left\{ \begin{matrix} {a_{31} = 0} \\ {{{and}\quad {\forall{i \in \text{[39:32]}}}},{a_{i} = 1}} \end{matrix} \right.$

then (∀iε [39:32], p_(i)=1) and p₃₁=0 and g₃₁=0 and Cout₃₀=0;

if B_(H)=1 and A_(H)=−3 and Cout₃₀=0,

when ${B_{H} = 1},\left\{ \begin{matrix} \left( {{\forall{i \in \text{[39:32]}}},{p_{i} = {{a_{i}\quad {and}\quad g_{i}} = 0}}} \right) \\ {{{and}\quad p_{31}} = {{a_{31}\quad {and}\quad g_{31}} = a_{31}}} \end{matrix} \right.$

then (∀iε [39:33], p_(i)=1) and p₃₂=0 and g₃₂=0 and g₃₁=1 and Cout₃₀=0.

Regardless of the method used to determine if there is an overflow, the process according to the invention includes supplying the multiplexer with a positive saturation value VALSAT+ or a negative saturation value VALSAT−, if an overflow is detected.

where VALSAT⁺=2^(n−1)−1

VALSAT⁻=−2^(n−1)

If the format that must not be exceeded is 32 bits, then:

VALSAT⁻=FF 8 000 0000 h;

and VALSAT⁺=00 7 FFF FFFF h.

If no overflow is detected, the evaluation unit 4 sends a NON-SAT message to the multiplexer 2 informing it that it can load the result S as soon as it has been determined. 

That which is claimed is:
 1. A method for determining an overflow to a format of a result of an arithmetic operation carried out by an arithmetic unit on two operands A and B and an input carry digit Cin input to the arithmetic unit, operands A and B being binary numbers and at least one of the operands A and B having m bits, the format of the result having n bits where n<m, the method comprising the steps of: considering only the m−n+1 highest order bits of operand A and operand B and an output carry digit Cout_(n−2) of rank n−2; and checking whether or not the m−n+1 bits satisfy a saturation condition, and if so deducing a size the result will exceed n bits; both the considering and checking steps being carried out in parallel with processing done by the arithmetic unit on operands A and B before the arithmetic unit has determined the result of the arithmetic operation.
 2. A method according to claim 1, wherein the m−n+1 highest order bits of operand A are denoted A_(H) and the m−n+1 highest order bits of operand B are denoted B_(H) and wherein the positive saturation condition is: A_(H)+B_(H)+Cout_(n−2)≧1, and a negative saturation condition is: A_(H)+B_(H)+Cout_(n−2)<−1.
 3. A method according to claim 2, wherein when A is expressed on 40 bits and B is expressed on 32 bits with n=32 and m=40, the positive saturation conditions are: B_(H)=0 and A_(H)>0; B_(H)=−1 and A_(H)>1; B_(H)=0 and A_(H)=0 and Cout₃₀=1; B_(H)=−1 and A_(H)=1 and Cout₃₀=1; and the negative saturation conditions are: B_(H)=0 and A_(H)<−2; B_(H)=−1 and A_(H)<−1; B_(H)=0 and A_(H)=−2 and Cout₃₀=0; B_(H)=−1 and A_(H)=−1 and Cout₃₀=0.
 4. A method according to claim 3, wherein when A is expressed on 40 bits and B is expressed on 33 bits, with n=32 and m=40, the positive saturation conditions are: B_(H)=−2 and A_(H)>2; B_(H)=−1 and A_(H)>1; B_(H)=0 and A_(H)>0; B_(H)=1 and A_(H)>−1; B_(H)=−2 and A_(H)=2 and Cout₃₀=1; B_(H)=−1 and A_(H)=1 and Cout₃₀=1; B_(H)=0 and A_(H)=0 and Cout₃₀=1; B_(H)=1 and A_(H)=−1 and Cout₃₀=1; and the negative saturation conditions are: B_(H)=−2 and A_(H)<0; B_(H)=−1 and A_(H)<−1; B_(H)=0 and A_(H)<−2; B_(H)=1 and A_(H)<−3; B_(H)=−2 and A_(H)=0 and Cout₃₀=0; B_(H)=−1 and A_(H)=−1 and Cout₃₀=0; B_(H)=0 and A_(H)=−2 and Cout₃₀=0; B_(H)=1 and A_(H)=−3 and Cout₃₀=0.
 5. A method according to claim 1, further comprising the step of determining propagation terms p_(i) and generation terms g_(i) each defined by a logical relation between components a_(i) and b_(i) of operands A and B before the considering or checking steps; and wherein the step of checking is based on using the m−n+1 highest order bits, denoted P_(H) for propagation terms p_(i) and denoted G_(H) for generation terms g_(i), and the output carry digit Cout_(n−2) of rank n−2.
 6. A method according to claim 5, wherein when A is expressed on 40 bits and B is expressed on 32 bits with n=32 and m=40, the positive saturation conditions are: g₃₁=1 and (∀iε (39:32), p_(i)=1) and Cout₃₀=1; p₃₉=1 and g₃₉=0 and ∃iε (38:32), g_(i)=1; ∀iε (39:31), p_(i)=0 and Cout₃₀=1; p₃₉=0 and (∃iε (38:31), p_(i)=1) and g₃₉=0; and the negative saturation conditions are: g₃₉=1 and (∃iε (38:31), g_(i)=0); ∀iε (39:31), g_(i)=1 and Cout₃₀=0; p₃₉=1 and ∃iε (38:32), p_(i)=0 and ∀iε (38:32), g_(i)=0 (∀iε (39:32), p_(i)=1) and g₃₁=0 and Cout₃₀=0 and p₃₁=0.
 7. A method according to claim 6, wherein when A is expressed on 40 bits and B is expressed on 33 bits with n=32 and m=40, the positive saturation conditions are: P₃₉=1 and g₃₂=1 and (p₃₁) XOR (g₃₁)=1 p₃₉=1 and ∃iε (38:33), g_(i)=1; p₃₉=0 and g₃₉=0 and NOT (∀iε (38:31), p_(i)=0 and g₃₁=0); (∀iε (39:32), p_(i)=1) and p₃₁=0 and g₃₂=1 and g₃₁=0 and Cout₃₀=1; (∀iε (39:32), p_(i)=1) and g₃₁=1 and Cout₃₀=1; (∀iε (39:31), p_(i)=0) and g₃₉=0 and g₃₁=0 and Cout₃₀=1; and the negative saturation conditions are: g₃₉=1 and ∃iε (38:31), g_(i)=0 p₃₉=1 and ∃iε (38:32), p_(i)=0; and ∀iε (38:32), g_(i)=0; p₃₉=1 and ∀iε (38:32), g_(i)=0; and not (∀iε (38:32), p_(i)=1) and not (∀iε (38:33), p_(i)=1 and p₃₂=0 and g₃₁=1) (∀iε (39:32), p_(i)=1) and p₃₁=0 and g₃₁=0 and Cout₃₀=0; (∀iε (39:31), g_(i)=1) and Cout₃₀=0; (∀iε (39:33), p_(i)=1) and p₃₂=0 and g₃₂=0 and g₃₁=1 and Cout₃₀=0.
 8. A method according to claim 1, further comprising the step of saturating the result to a binary value 2^(n−1)−1 for a positive saturation of a format with n bits, and to a binary value −2^(n−1) for a negative saturation of a format with n bits responsive to an overflow.
 9. A method for determining an overflow to a format of a result of an arithmetic operation carried out by an arithmetic unit on two operands A and B and an input carry digit Cin input to the arithmetic unit, operands A and B being binary numbers and at least one of the operands A and B having m bits, the format of the result having n bits where n<m, the method comprising the steps of: considering only the m−n+1 highest order bits of operand A and operand B and an output carry digit Cout_(n−2) of rank n−2; checking whether or not the m−n+1 bits satisfy a saturation condition, and if so deducing a size the result will exceed n bits; both the considering and checking steps being carried out in parallel with processing done by the arithmetic unit on operands A and B before the arithmetic unit has determined the result of the arithmetic operation; wherein the m−n+1 highest order bits of operand A are denoted A_(H) and the m−n+1 highest order bits of operand B are denoted B_(H) and wherein the positive saturation condition is: A_(H)+B_(H)+Cout_(n−2)≦1, and a negative saturation condition is: A_(H)+B_(H)+Cout_(n−2)<−1; and saturating the result to a binary value 2^(n−1)−1 for a positive saturation of a format with n bits, and to a binary value −2^(n−1) for a negative saturation of a format with n bits.
 10. A method according to claim 9, wherein when A is expressed on 40 bits and B is expressed on 32 bits with n=32 and m=40, the positive saturation conditions are: B_(H)=0 and A_(H)>0; B_(H)=−1 and A_(H)>1; B_(H)=0 and A_(H)=0 and Cout₃₀=1; B_(H)=−1 and A_(H)=1 and Cout₃₀=1; and the negative saturation conditions are: B_(H)=0 and A_(H)<−2; B_(H)=−1 and A_(H)<−1; B_(H)=0 and A_(H)=−2 and Cout₃₀=0; B_(H)=−1 and A_(H)=−1 and Cout₃₀=0.
 11. A method according to claim 9, wherein when A is expressed on 40 bits and B is expressed on 33 bits, with n=32 and m=40, the positive saturation conditions are: B_(H)=−2 and A_(H)>2; B_(H)=−1 and A_(H)>1; B_(H)=0 and A_(H)>0; B_(H)=1 and A_(H)>−1; B_(H)=−2 and A_(H)=2 and Cout₃₀=1; B_(H)=−1 and A_(H)=1 and Cout₃₀=1; B_(H)=0 and A_(H)=0 and Cout₃₀=1; B_(H)=1 and A_(H)=−1 and Cout₃₀=1; and the negative saturation conditions are: B_(H)=−2 and A_(H)<0; B_(H)=−1 and A_(H)<−1; B_(H)=0 and A_(H)<−2; B_(H)=1 and A_(H)<−3; B_(H)=−2 and A_(H)=0 and Cout₃₀=0; B_(H)=−1 and A_(H)=−1 and Cout₃₀=0; B_(H)=0 and A_(H)=−2 and Cout₃₀=0; B_(H)=1 and A_(H)=−3 and Cout₃₀=0.
 12. A method for determining an overflow to a format of a result of an arithmetic operation carried out by an arithmetic unit on two operands A and B and an input carry digit Cin input to the arithmetic unit, operands A and B being binary numbers and at least one of the operands A and B having m bits, the format of the result having n bits where n<m, the method comprising the steps of: considering only the m−n+1 highest order bits of operand A and operand B and an output carry digit Cout_(n−2) of rank n−2; checking whether or not the m−n+1 bits satisfy a saturation condition, and if so deducing a size the result will exceed n bits; both the considering and checking steps being carried out in parallel with processing done by the arithmetic unit on operands A and B before the arithmetic unit has determined the result of the arithmetic operation; determining propagation terms p_(i) and generation terms g_(i) each defined by a logical relation between components a_(i) and b_(i) of operands A and B before the considering or checking steps; wherein the step of checking is based on using the m−n+1 highest order bits, denoted P_(H) for propagation terms p_(i) and denoted G_(H) for generation terms g_(i), and the output carry digit Cout_(n−2) of rank n−2; and saturating the result to a binary value 2^(n−1)−1 for a positive saturation of a format with n bits, and to a binary value −2^(n−1) for a negative saturation of a format with n bits.
 13. A method according to claim 12, wherein when A is expressed on 40 bits and B is expressed on 32 bits with n=32 and m=40, the positive saturation conditions are: g₃₁=1 and (∀iε (39:32), p_(i)=1) and Cout₃₀=1; p₃₉=1 and g₃₉=0 and ∃iε (38:32), g_(i)=1; ∀iε (39:31), p_(i)=0 and Cout₃₀=1; p₃₉=0 and (∃iε (38:31), p_(i)=1) and g₃₉=0; and the negative saturation conditions are: g₃₉=1 and (∃iε (38:31), g_(i)=0); ∀iε (39:31), g_(i)=1 and Cout₃₀=0; p₃₉=1 and ∃iε (38:32), p_(i)=0 and ∀iε (38:32), g_(i)=0 (∀iε (39:32), p_(i)=1) and g₃₁=0 and Cout₃₀=0 and p₃₁=0.
 14. A method according to claim 12, wherein when A is expressed on 40 bits and B is expressed on 33 bits with n=32 and m=40, the positive saturation conditions are: p₃₉=1 and g₃₂=1 and (p₃₁) XOR (g₃₁)=1 p₃₉=1 and ∃iε (38:33), g_(i)=1; p₃₉=0 and g₃₉=0 and NOT (∀iε (38:31), p_(i)=0 and g₃₁=0); (∀iε (39:32), p_(i)=1) and p₃₁=0 and g₃₂=1 and g₃₁=0 and Cout₃₀=1; (∀iε (39:32), p_(i)=1) and g₃₁=1 and Cout₃₀=1; (∀iε (39:31), p_(i)=0) and g₃₉=0 and g₃₁=0 and Cout₃₀=1; and the negative saturation conditions are: g₃₉=1 and ∃iε (38:31), g_(i)=0 p₃₉=1 and ∃iε (38:32), p_(i)=0; and ∀iε (38:32), g_(i)=0; p₃₉=1 and ∃iε (38:32), g_(i)=0; and not (∀iε (38:32), p_(i)=1) and not (∀iε (38:33), p_(i)=1 and p₃₂=0 and g₃₁=1) (∀iε (39:32), p_(i)=1) and p₃₁=0 and g₃₁=0 and Cout₃₀=0; (∀iε (39:31), g_(i)=1) and Cout₃₀=0; (∀iε (39:33), p_(i)=1) and p₃₂=0 and g₃₂=0 and g₃₁=1 and Cout₃₀=0.
 15. An apparatus for performing an arithmetic operation comprising: an arithmetic unit; and overflow determining means for determining an overflow to a format of a result of an arithmetic operation carried out by the arithmetic unit on two operands A and B and an input carry digit Cin input to the arithmetic unit, operands A and B being binary numbers and at least one of the operands A and B having m bits, the format of the result having n bits where n<m, the overflow determining means comprising considering means for considering only the m−n+1 highest order bits of operand A and operand B and an output carry digit Cout_(n−2) of rank n−2; and checking means for checking whether or not the m−n+1 bits satisfy a saturation condition, and if so deducing a size of the result S will exceed n bits; both the considering and checking means carrying out operations in parallel with processing done by the arithmetic unit on operands A and B before the arithmetic unit has determined the result of the arithmetic operation.
 16. An apparatus according to claim 15, further comprising means for saturating the result to a binary value 2^(n−1)−1 for a positive saturation of a format with n bits, and for saturating the result to a binary value −2^(n−1) for a negative saturation of a format with n bits based upon an overflow.
 17. An apparatus for performing an arithmetic operation comprising: an arithmetic unit; and an overflow determining unit for determining an overflow to a format of a result of an arithmetic operation carried out by said arithmetic unit on two operands A and B and an input carry digit Cin input to said arithmetic unit, operands A and B being binary numbers and at least one of the operands A and B having m bits, the format of the result having n bits where n<m, said overflow determining unit considering only the m−n+1 highest order bits of operand A and operand B and an output carry digit Cout_(n−2) of rank n−2, said overflow determining unit also checking whether or not the m−n+1 bits satisfy a saturation condition, and if so deducing a size of the result S will exceed n bits; said overflow determining unit carrying out operations in parallel with processing done by said arithmetic unit on operands A and B before said arithmetic unit has determined the result of the arithmetic operation.
 18. An apparatus according to claim 17 wherein said overflow determining unit saturates the result to a binary value 2^(n−1)−1 for a positive saturation of a format with n bits, and saturates the result to a binary value −2^(n−1) for a negative saturation of a format with n bits based upon an overflow. 